package com.webservice.utils;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/***
 * 在服务器启动的时候获得上下文对象
 * @author xiangxw
 *
 */
public class MyApplicationContextUtil implements ApplicationContextAware {
	private static ApplicationContext context;
	@Override
	public void setApplicationContext(ApplicationContext cntxt)throws BeansException {
		context = cntxt;
	}

	public static ApplicationContext getContext() {
		return context;
	}
}
